// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  compatibilityDate: "2025-05-15",
  devtools: { enabled: false },
  modules: ["@unocss/nuxt", "@pinia/nuxt"],

  // 网站基础信息配置
  app: {
    head: {
      htmlAttrs: {
        lang: "zh-CN",
      },
      title: "电商助手 - AI智能SKU生成器 | 商品标题优化工具",
    },
  },
  pinia: {
    storesDirs: ["./stores/**"],
  },
  devServer: {
    port: 4379,
  },
  runtimeConfig: {
    // 仅在服务端可用的私有键
    apiSecret: "123",
    // public 中的键也会暴露给客户端
    public: {
      apiBase: "",
      siteUrl: "https://your-domain.com",
      initPoints: 50,
      normalPoints: 25,
      vipPoints: 500,
      svipPoints: 1000,
    },
  },
  // SSR和预渲染优化
  ssr: true,
  nitro: {
    preset: "node-server",
    prerender: {
      routes: ["/"],
    },
    compressPublicAssets: true,
  },
});
